﻿<Window x:Class="SoftTeach.View.Main.OptionsDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:resources="clr-namespace:SoftTeach.Resources"
        xmlns:Setting="clr-namespace:SoftTeach.Setting" xmlns:controls="clr-namespace:SoftTeach.Resources.Controls"
        Title="Einstellungen ..." MinHeight="200" Height="328" Width="433" WindowStyle="SingleBorderWindow"
        Icon="/SoftTeach;component/Images/Settings.ico">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="80"/>
      <RowDefinition/>
    </Grid.RowDefinitions>
        <controls:DialogHeader  Icon="/SoftTeach;component/Images/Settings.ico" Grid.Row="0" Title="Verändern Sie hier die Einstellungen für Ihre Datenbank."/>
    <Border Grid.Row="1" Name="DescriptionArea" Background="{StaticResource MainBackgroundBrush}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="*"/>
          <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Row="0">
          <TabItem Header="Lehrer">
            <Grid Margin="5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Label Grid.Row="0" Grid.Column="0" Content="Name"/>
              <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                <TextBox Name="LehrerTitel" Width="30" Margin="5,0,5,0" Text="{Binding Path=Lehrer.Titel, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="LehrerVorname" Width="100"  Margin="5,0,5,0" Text="{Binding Path=Lehrer.Vorname, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="LehrerNachname" Width="150" Margin="5,0,5,0" Text="{Binding Path=Lehrer.Nachname, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
              <Label Grid.Row="1" Grid.Column="0" Content="Adresse"/>
              <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Margin="0,3,0,3">
                <TextBox Name="LehrerStrasse" Width="240" Margin="5,0,5,0"  Text="{Binding Path=Lehrer.Straße, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="LehrerHausnummer" Width="50" Margin="5,0,5,0"  Text="{Binding Path=Lehrer.Hausnummer, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
              <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" Margin="0,0,0,3">
                <TextBox Name="LehrerPostleitzahl" Width="50" Margin="5,0,5,0"  Text="{Binding Path=Lehrer.PLZ, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="LehrerStadt" Width="240" Margin="5,0,5,0"  Text="{Binding Path=Lehrer.Ort, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
            </Grid>
          </TabItem>
          <TabItem Header="Schule">
            <Grid Margin="5">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Label Grid.Row="0" Grid.Column="0" Content="Name"/>
              <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                <TextBox Name="SchuleName" Width="300" Margin="5,0,5,0" Text="{Binding Path=Schule.Name, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
              <Label Grid.Row="1" Grid.Column="0" Content="Adresse"/>
              <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Margin="0,3,0,3">
                <TextBox Name="SchuleStrasse" Width="240" Margin="5,0,5,0" Text="{Binding Path=Schule.Strasse, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="SchuleHausnummer" Width="50" Margin="5,0,5,0" Text="{Binding Path=Schule.Hausnummer, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
              <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" Margin="0,0,0,3">
                <TextBox Name="SchulePostleitzahl" Width="50" Margin="5,0,5,0" Text="{Binding Path=Schule.Postleitzahl, Source={x:Static Setting:Configuration.Instance}}"/>
                <TextBox Name="SchuleStadt" Width="240" Margin="5,0,5,0" Text="{Binding Path=Schule.Stadt, Source={x:Static Setting:Configuration.Instance}}"/>
              </StackPanel>
            </Grid>
          </TabItem>
        </TabControl>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
          <Button Name="Speichern" Width="60" Margin="5" IsDefault="True" Click="SaveButtonClick">Speichern</Button>
          <Button Name="Abbrechen"  Width="60" Margin="5" IsCancel="True" Click="CancelButtonClick">Abbrechen</Button>
        </StackPanel>
      </Grid>
    </Border>
  </Grid>
</Window>
